/**
 *  1. 创建一个类
 * */
class School {
  constructor(name, age, address) {
    this.name = name;
    this.age = age;
    this.address = address;
  }
  whatYou() {
    return 'your schoole is ' + this.name;
  }
  youLike() {
    return 'you like it  ' + this.address + this.name + this.age;
  }
}

const XinjiSchool = new School('新集', 90, '泗县大庄')
console.log(XinjiSchool.youLike())


/**
 *  2. 继承类
 * */
class Shan extends School {
  constructor(name, age, address) {
    super(name, age, address);
    this.name = name;
    this.age = age;
    this.address = address;
  }
  whatYou() {
    return 'new ' + super.whatYou();
  }
  youLike() {
    return 'new' + super.youLike();
  }
}

let ss = new Shan('www', 22, '99');
console.log(ss.youLike());